home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / include / incl98.zoo / ioctl.h < prev    next >
C/C++ Source or Header  |  1994-03-29  |  5KB  |  235 lines

  1. #ifndef    _IOCTL_H
  2. #define _IOCTL_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. #define TIOCGETP    (('T'<< 8) | 0)
  13. #define TIOCSETP    (('T'<< 8) | 1)
  14. #define TIOCSETN    TIOCSETP
  15. #define TIOCGETC    (('T'<< 8) | 2)
  16. #define TIOCSETC    (('T'<< 8) | 3)
  17. #define TIOCGLTC    (('T'<< 8) | 4)
  18. #define TIOCSLTC    (('T'<< 8) | 5)
  19. #define TIOCGWINSZ    (('T'<< 8) | 11)
  20. #define TIOCSWINSZ    (('T'<< 8) | 12)
  21.  
  22. #ifdef __MINT__
  23. #define FSTAT        (('F'<< 8) | 0)
  24. #define FIONREAD    (('F'<< 8) | 1)
  25. #define FIONWRITE    (('F'<< 8) | 2)
  26. #define FUTIME        (('F'<< 8) | 3)
  27. #define FTRUNCATE    (('F'<< 8) | 4)
  28. #define TIOCGPGRP    (('T'<< 8) | 6)
  29. #define TIOCSPGRP    (('T'<< 8) | 7)
  30. #define TIOCFLUSH    (('T'<< 8) | 8)
  31. #define TIOCSTOP    (('T'<< 8) | 9)
  32. #define TIOCSTART    (('T'<< 8) | 10)
  33. #define TIOCGXKEY    (('T'<< 8) | 13)
  34. #define TIOCSXKEY    (('T'<< 8) | 14)
  35.  
  36. #define TIOCIBAUD    (('T'<< 8) | 18)
  37. #define TIOCOBAUD    (('T'<< 8) | 19)
  38. #define TIOCCBRK    (('T'<< 8) | 20)
  39. #define TIOCSBRK    (('T'<< 8) | 21)
  40. #define TIOCGFLAGS    (('T'<< 8) | 22)
  41. #define TIOCSFLAGS    (('T'<< 8) | 23)
  42. #define TIOCOUTQ    (('T'<< 8) | 24)
  43.  
  44. /* faked by the library */
  45. #define TIOCMGET    (('T'<< 8) | 248)
  46. #define TIOCCDTR    (('T'<< 8) | 249)
  47. #define TIOCSDTR    (('T'<< 8) | 250)
  48. #define TIOCNOTTY    (('T'<< 8) | 251)
  49.  
  50. /* bits in longword fetched by TIOCMGET */
  51. #define TIOCM_LE    0001 /* not supported */
  52. #define TIOCM_DTR    0002
  53. #define TIOCM_RTS    0004
  54. #define TIOCM_ST    0010 /* not supported */
  55. #define TIOCM_SR    0020 /* not supported */
  56. #define TIOCM_CTS    0040
  57. #define TIOCM_CAR    0100
  58. #define TIOCM_CD    TIOCM_CAR
  59. #define TIOCM_RNG    0200
  60. #define TIOCM_RI    TIOCM_RNG
  61. #define TIOCM_DSR    0400 /* not supported */
  62.  
  63. /* not yet implemented in MiNT */
  64. #define TIOCGETD    (('T'<< 8) | 252)
  65. #define TIOCSETD    (('T'<< 8) | 253)
  66. #define TIOCLGET    (('T'<< 8) | 254)
  67. #define TIOCLSET    (('T'<< 8) | 255)
  68.  
  69. #define NTTYDISC    1
  70.  
  71. /* ioctl's to act on processes */
  72. #define PPROCADDR    (('P'<< 8) | 1)
  73. #define PBASEADDR    (('P'<< 8) | 2)
  74. #define PCTXTSIZE    (('P'<< 8) | 3)
  75. #define PSETFLAGS    (('P'<< 8) | 4)
  76. #define PGETFLAGS    (('P'<< 8) | 5)
  77. #define PTRACESFLAGS    (('P'<< 8) | 6)
  78. #define PTRACEGFLAGS    (('P'<< 8) | 7)
  79. #    define    P_ENABLE    (1 << 0)    /* enable tracing */
  80. #if 0 /* NOTYETDEFINED */
  81. #    define    P_DOS        (1 << 1)    /* trace DOS calls - unimplemented */
  82. #    define    P_BIOS        (1 << 2)    /* trace BIOS calls - unimplemented */
  83. #    define    P_XBIOS        (1 << 3)    /* trace XBIOS calls - unimplemented */
  84. #endif
  85.  
  86. #define PTRACEGO    (('P'<< 8) | 8)    /* these 4 must be together */
  87. #define PTRACEFLOW    (('P'<< 8) | 9)
  88. #define PTRACESTEP    (('P'<< 8) | 10)
  89. #define PTRACE11    (('P'<< 8) | 11)
  90. #define PLOADINFO    (('P'<< 8) | 12)
  91. #define    PFSTAT        (('P'<< 8) | 13)
  92.  
  93. struct __ploadinfo {
  94.     /* passed */
  95.     short fnamelen;
  96.     /* returned */
  97.     char *cmdlin, *fname;
  98. };
  99.  
  100. /* shared memory ioctl's */
  101. #define SHMGETBLK    (('M'<< 8) | 0)
  102. #define SHMSETBLK    (('M'<< 8) | 1)
  103.  
  104. /* cursor control ioctl's */
  105. #define TCURSOFF    (('c'<< 8) | 0)
  106. #define TCURSON        (('c'<< 8) | 1)
  107. #define TCURSBLINK    (('c'<< 8) | 2)
  108. #define TCURSSTEADY    (('c'<< 8) | 3)
  109. #define TCURSSRATE    (('c'<< 8) | 4)
  110. #define TCURSGRATE    (('c'<< 8) | 5)
  111. #endif /* __MINT__ */
  112.  
  113. #ifndef _filesys_h
  114. struct tchars {
  115.     char    t_intrc;
  116.     char    t_quitc;
  117.     char    t_startc;
  118.     char    t_stopc;
  119.     char    t_eofc;
  120.     char    t_brkc;
  121. };
  122.  
  123. struct ltchars {
  124.     char    t_suspc;
  125.     char    t_dsuspc;
  126.     char    t_rprntc;
  127.     char    t_flushc;
  128.     char    t_werasc;
  129.     char    t_lnextc;
  130. };
  131.  
  132. #define    CRMOD        0x0001
  133. #define    CBREAK        0x0002
  134. #ifndef _TERMIOS_H
  135. #define ECHO        0x0004
  136. #endif /* _TERMIOS_H */
  137. #define    XTABS        0x0008
  138. #define    RAW        0x0010
  139. #define LCASE        0x0020        /* does nothing */
  140. #ifndef _TERMIOS_H
  141. #define NOFLSH        0x0040
  142. #ifdef __MINT__
  143. #define TOSTOP        0x0100
  144. #endif /* __MINT__ */
  145. #endif /* _TERMIOS_H */
  146. #define TANDEM        0x1000
  147. #define _RTSCTS        0x2000
  148. #define EVENP        0x4000
  149. #define ODDP        0x8000
  150. #define ANYP        (0)
  151. #endif /* _filesys_h */
  152.  
  153. #ifndef _TERMIOS_H
  154. #define B0        0
  155. #define B50        1
  156. #define B75        2
  157. #define B110        3
  158. #define B134        4
  159. #define B135        4
  160. #define B150        5
  161. #define B200        6
  162. #define B300        7
  163. #define B600        8
  164. #define B1200        9
  165. #define B1800        10
  166. #define B2400        11
  167. #define B4800        12
  168. #define B9600        13
  169. #define B19200        14
  170. #define B38400        15
  171. #endif
  172.  
  173. /* The ones below aren't supported by the kernel, at least not yet */
  174. #define VTDELAY        0
  175. #define ALLDELAY    0
  176.  
  177. #ifdef __MINT__
  178.  
  179. #define XKEY        0x0200
  180.  
  181. #ifndef _filesys_h
  182. struct xkey {
  183.     short    xk_num;
  184.     char    xk_def[8];
  185. };
  186. #endif
  187.  
  188. /* some fake defines for the line discipline stuff */
  189.  
  190. #define LCRTBS        0x01
  191. #define LCRTERA        0x02
  192. #define LCRTKIL        0x04
  193. #define LPRTERA        0x10
  194. #define LFLUSHO        0x20
  195. #define LLITOUT        0x100
  196.  
  197. #else
  198.  
  199. #define META        0x0100        /* extension: Alternate as meta key */
  200. #define PASS8        0x0100
  201.  
  202. #endif /* __MINT__ */
  203.  
  204. #ifndef _filesys_h
  205. struct sgttyb {
  206.     char    sg_ispeed;
  207.     char    sg_ospeed;
  208.     char    sg_erase;
  209.     char    sg_kill;
  210.     short    sg_flags;
  211. };
  212.  
  213. struct winsize {
  214.     short    ws_row;
  215.     short    ws_col;
  216.     short    ws_xpixel;
  217.     short    ws_ypixel;
  218. };
  219. #endif
  220.  
  221. struct _mutimbuf {
  222.     unsigned short actime, acdate;    /* GEMDOS format */
  223.     unsigned short modtime, moddate;
  224. };
  225.  
  226. __EXTERN int ioctl    __PROTO((int, int, void *));
  227. __EXTERN int stty    __PROTO((int, struct sgttyb *));
  228. __EXTERN int gtty    __PROTO((int, struct sgttyb *));
  229.  
  230. #ifdef __cplusplus
  231. }
  232. #endif
  233.  
  234. #endif    /* _IOCTL_H */
  235.